//
//  YZHomeInfoApi.m
//  ZhuKuang
//
//  Created by jayce on 17/7/13.
//  Copyright © 2017年 jjkj. All rights reserved.
//

#import "YZHomeInfoApi.h"

@implementation YZHomeInfoApi

+ (void)getYZHomeInfo:(NSDictionary *)postParams success:(ResponseBlock)response{
    
    [MBProgressHUD postLoadViewWithText:HUD_PLEASEWAIT View:kWindow];
    [ClientRequest SOAPMthod:GetYZHomeInfo
                    soapBody:postParams
                     success:^(id responseObject) {
                         [MBProgressHUD hideLoadViewWithView:kWindow];
                         if ([DataCheck isValidDictionary:responseObject]) {
                             if (response) {
                                 response(responseObject);
                             }
                         }
                     } failure:^(NSError *error) {
                         [MBProgressHUD postMessageWithText:@"请求失败" View:kWindow];
                         
                         NSData *data = error.userInfo[@"com.alamofire.serialization.response.error.data"];
                         NSString *str = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
                         NSLog(@"服务器的错误原因：%@",str);
                     }];
}
@end
